# $Id: PKGBUILD 184199 2013-05-03 13:03:50Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgname=kdevelop-python
pkgver=1.5.0
pkgrel=1
pkgdesc="Python language and documentation plugin for KDevelop"
arch=('i686' 'x86_64')
url="http://www.kdevelop.org/"
license=('GPL')
depends=('kdevelop')
makedepends=('cmake' 'automoc4' 'kdevelop-pg-qt')
source=("http://download.kde.org/stable/kdevelop/kdev-python/${pkgver}/src/kdev-python-v${pkgver}.tar.bz2")
sha1sums=('fb9af112910c5655ce52bf9cfef19bacbab4f62f')

build() {
  mkdir build
  cd build
  cmake ../kdev-python-v${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install

  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
      "${pkgdir}"/usr/share/apps/kdevpythonsupport/encodings/encodings/rot_13.py
}
